package com.leung.mybatisplusstudy.controller;


import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.leung.mybatisplusstudy.domain.entity.User;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author leung
 * @since 2024-12-02
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping
    public User getById(@RequestParam Long id) {
        return Db.getById(id, User.class);
    }
    
    
}
